home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / SUB_ARCT / TEST / FLOW_TES.JAV < prev    next >
Encoding:
Text File  |  1996-10-04  |  1.7 KB  |  57 lines

  1. /**
  2.  * This is an example program which displays an HTML document
  3.  * in a text_flow.
  4.  */
  5. package sub_arctic.test;
  6.  
  7. import sub_arctic.lib.*;
  8. import sub_arctic.output.*;
  9. import sub_arctic.input.*;
  10. import sub_arctic.constraints.std_function;
  11.  
  12. import java.awt.Font;
  13.  
  14. /**
  15.  * This is an example program which displays an HTML document
  16.  * in a text_flow.
  17.  * 
  18.  * @author Ian Smith 
  19.  * @version $Id: flow_test.java,v 1.10 1996/10/03 19:46:51 hudson Exp $
  20.  */
  21. public class flow_test extends debug_interactor_applet {
  22.   public void build_ui(base_parent_interactor top) {
  23.     text_flow tf;
  24.     panner p;
  25.     /* build the flow */
  26.     tf=new text_flow(null,580);
  27.     /* make a panner with this object in it */
  28.     p=new panner(tf);
  29.     // put the flow in 
  30.     top.add_child(p);
  31.     /* now position it */
  32.     p.set_x(10);
  33.     p.set_y(10);
  34.     p.set_w_constraint(std_function.offset(PARENT.X2(), -20));
  35.     p.set_h_constraint(std_function.offset(PARENT.Y2(), -20));
  36.     /* now set the text */
  37.     tf.set_text(getParameter("text"));
  38.     System.out.println("Width is now: " + tf.w());
  39.   }
  40. }
  41. /*=========================== COPYRIGHT NOTICE ===========================
  42.  
  43. This file is part of the subArctic user interface toolkit.
  44.  
  45. Copyright (c) 1996 Scott Hudson and Ian Smith
  46. All rights reserved.
  47.  
  48. The subArctic system is freely available for most uses under the terms
  49. and conditions described in 
  50.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  51. and appearing in full in the lib/interactor.java source file.
  52.  
  53. The current release and additional information about this software can be 
  54. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  55.  
  56. ========================================================================*/
  57.